package cn.auction.dao;

import cn.auction.entity.Auction;
import cn.auction.entity.AuctionPage;
import cn.auction.entity.Auctionrecord;
import cn.auction.entity.EndAuction;

import java.sql.SQLException;
import java.util.List;

public interface AuctionDao {
    //查看所有竞拍商品
    List<Auction> showAllAuctio(String newSql) throws SQLException;
    AuctionPage<Auction> showAllAuction(Auction condition, int pageIndex) throws SQLException;
    //新增
    public int AddAuction(Auction auction) throws SQLException;
    //根据id查询拍卖品信息
    Auction ShowAuctionById(int id) throws SQLException;
    //修改拍卖品信息
    public int UpdateAuction(Auction auction) throws SQLException;
    //删除
    public int deleteAuction(int auctionId) throws SQLException;
    //查看竞拍信息
    public List<Auctionrecord> showAuctionrecord(int auctionId) throws SQLException;
    //新增竞拍信息
    public int AddAuctionrecord(int userId,int auctionId,double auctionPrice) throws SQLException;
    //查看拍卖结束的商品
    public List<EndAuction> showEndTimeAuction() throws SQLException;
    //啥看拍卖商品中的名称
    public List<EndAuction> showAuctionNowTime() throws SQLException;
}
